package com.harveyguo.nihonngo.model.entity;

import jakarta.persistence.*;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 拳击角实体
 */
@Entity
@Data
@Table(name = "boxing_corners")
public class BoxingCorner extends BaseUserEntity {

    private String name; // 拳击角名称

    private String description; // 描述

    private String location; // 具体位置

    private Double latitude; // 纬度

    private Double longitude; // 经度

    private String meetingTime; // 聚会时间

    private String meetingDays; // 聚会日期，如"周一,周三,周五"

    private Integer maxParticipants; // 最大参与人数

    private String skillLevel; // 适合的技能水平

    private String equipment; // 需要的装备

    private String rules; // 规则说明

    private Boolean isActive = true; // 是否活跃

    private String contactInfo; // 联系信息

    private String images; // 图片，JSON格式

    // 关联的拳馆
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "gym_id")
    private BoxingGym boxingGym;

    // 创建者
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "creator_id")
    private User creator;

    // 参与者
    @ManyToMany(fetch = FetchType.LAZY)
    @JoinTable(name = "corner_participants", joinColumns = @JoinColumn(name = "corner_id"), inverseJoinColumns = @JoinColumn(name = "user_id"))
    private List<User> participants;
}